<?php
##登陆后页面
require_once 'function/global.php';
if (!is_logged()) {
    show_error_page();
    die();
}
$username = get_logged_username();
$conn = db_connect();
$sql = "select * from user where username= '$username'";
$result = mysqli_query($conn, $sql) or die_db_error($conn);
$row = mysqli_fetch_array($result);
$headimg=$row['headimg'];
$viplevel=$row['viplevel'];
$experience=$row['experience'];
$signature = $row['signature'];
mysqli_close($conn);
?>
<html lang="zh-CN">
  <head lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>我的</title>
    <link rel="stylesheet" href="js/jquery/jquery.mobile-1.4.5.min.css"/>
    
    <link href="css/mine.css" rel="stylesheet">
    <link href="css/total/index.css" rel="stylesheet">

  </head>
  <body>
     <div data-role="page"  id="mine">
         <div >
             <img src="<?php echo $headimg;?>" class="mine_touxiang" width="105">
             <h5 class="mine_font"><?php echo $username;?></h5>
             <h6 style="color:grey;" class="mine_font1"><?php echo $signature;?></h6>
             <a data-role="none" href="member.html"><h4 class="mine_font2"><?php echo $viplevel;?>&nbsp;&nbsp;积分：<?php echo $experience;?></h4></a>
             <a style="color:grey" class="mine_linkstyle" href="personal.html">个人资料</a><br/><br/>
             <a style="color:grey" class="mine_linkstyle" href="history.html">历史路线</a><br/><br/>
             <a style="color:grey" class="mine_linkstyle2" href="myticket.html">我的地铁票</a><br/><br/>
             <a style="color:grey" class="mine_linkstyle" href="mycollection.html">我的收藏</a><br/><br/>
              <div><a class="mine_button"  href="index.html" onclick="logout();">退出当前账户</a></div>                                                     
         </div>
         
         <div data-role="footer" data-position="fixed" style="background:#313131;">
             <a href="next.php" data-role="none" class="mine_button_footer"><img src="img/house14.png"></a>
             
             <a href="buy%20ticket.html" data-role="none" class="mine_button_footer" ><img src="img/tickets1.png"></a>
             
             <a href="mine.php" data-role="none" class="mine_button_footer"><img src="img/users.png"></a>
         </div>
         
     </div>
     
     <script src="js/jquery/jquery-1.12.0.min.js"></script>
    <script src="js/jquery/jquery.mobile-1.4.5.min.js"></script>
    <script>
            function logout() {
                if (confirm("是否退出？")) {
                    $.post("function/logout.php", {}, function (data, status) {
                        if (data.status != "ok") {
                            alert(data.message);
                        } else {
                            window.location.href = data.data;
                        }
                    }, "json");
                }
            }
         </script>
  </body>
</html>